package exception;

/**
 * 自定义异常
 * 通常当项目中需要描述一个满足语法但是不满足业务场景的错误时，可以使用自定义异常
 * 自定义异常应当满足下列要求:
 * 1:类名应当做到见名知意
 * 2:自定义异常类继承Exception或者RuntimeException
 * 3:添加所有构造器
 *
 * illegal:非法的
 */
public class IllegalAgeException extends Exception{
    public IllegalAgeException() {
    }

    public IllegalAgeException(String message) {
        super(message);
    }

    public IllegalAgeException(String message, Throwable cause) {
        super(message, cause);
    }

    public IllegalAgeException(Throwable cause) {
        super(cause);
    }

    public IllegalAgeException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}



